package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YonghuMapper;
import com.ruoyi.system.domain.Yonghu;
import com.ruoyi.system.service.IYonghuService;

/**
 * 老师Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
@Service
public class YonghuServiceImpl implements IYonghuService 
{
    @Autowired
    private YonghuMapper yonghuMapper;

    /**
     * 查询老师
     * 
     * @param id 老师主键
     * @return 老师
     */
    @Override
    public Yonghu selectYonghuById(Long id)
    {
        return yonghuMapper.selectYonghuById(id);
    }

    /**
     * 查询老师列表
     * 
     * @param yonghu 老师
     * @return 老师
     */
    @Override
    public List<Yonghu> selectYonghuList(Yonghu yonghu)
    {
        return yonghuMapper.selectYonghuList(yonghu);
    }

    /**
     * 新增老师
     * 
     * @param yonghu 老师
     * @return 结果
     */
    @Override
    public int insertYonghu(Yonghu yonghu)
    {
        return yonghuMapper.insertYonghu(yonghu);
    }

    /**
     * 修改老师
     * 
     * @param yonghu 老师
     * @return 结果
     */
    @Override
    public int updateYonghu(Yonghu yonghu)
    {
        return yonghuMapper.updateYonghu(yonghu);
    }

    /**
     * 批量删除老师
     * 
     * @param ids 需要删除的老师主键
     * @return 结果
     */
    @Override
    public int deleteYonghuByIds(Long[] ids)
    {
        return yonghuMapper.deleteYonghuByIds(ids);
    }

    /**
     * 删除老师信息
     * 
     * @param id 老师主键
     * @return 结果
     */
    @Override
    public int deleteYonghuById(Long id)
    {
        return yonghuMapper.deleteYonghuById(id);
    }
}
